/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __PQ_EXECUTOR_H__
#define __PQ_EXECUTOR_H__

#include "DataSerializer.h"
#include "Object.h"

using namespace PQCore;
namespace PQEngine
{
	/*Private class for GameEngine class use,mainly create objects for scene object
	*/
	class NgExecutor
	{
	public:
		/*Add resource in file system
		*/
		static SerializeDatagram* genAddResource(std::string path);
		/*Add resource in wow archive(mpq archives)
		*/
		static SerializeDatagram* genAddChrModel(std::string path);
		static SerializeDatagram* genCreateObject(ObjectType type);
		
		static SerializeDatagram* genAddGPKResoure(std::string path);
		
		static SerializeDatagram* genCreateLightObject(int lightType);

		static SerializeDatagram* genCreateTerrainObject(int slotX,int slotY);

		//friend void GameEngine::exec(char* data,int len);
	private:
		/*Execute cmd datagram*/
		static void exec(char* data,int len);
		static GameObject* addGPKResource(std::string path);
		static void addResource(std::string path);
		static void addCharacterModel(std::string path);

		static void createObject(ObjectType type);

	};

}

#define GNgineExec PQEngine::NgExecutor

#endif
